package com.philips.util;

import java.io.BufferedReader;
import java.io.InputStream;
import java.util.Properties;

import com.philips.research.vp.utilities.UtilsVP;

public class Common {
	public static String realPath="c:/temp/";
	public static Properties confProp=new Properties();
	static{
    	InputStream confstream = Common.class.getResourceAsStream("/conf.properties");
    	try {
    		confProp.load(confstream);
    	}catch(Exception e){
    		e.printStackTrace();
    	}
    		
	}
	
	public static String readFile(String filename) {
		BufferedReader in = UtilsVP.openReadFile(filename);
		String line;
		StringBuilder sb = new StringBuilder();
		
		while ((line = UtilsVP.readln(in)) != null) {
			if (UtilsVP.notEmptyAndNoComment(line)) {
				sb.append(line);
			}
		}
		return sb.toString();
	}
}
